<?php

/**
 * FriendReferral form.
 *
 * @package    docplus.co.za
 * @subpackage form
 * @author     Fox Matuku
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class FriendReferralForm extends BaseFriendReferralForm
{

    public function configure()
    {
        unset(
            $this['created_at'], $this['updated_at']
        );
        
        if (!$isFirst = $this->getOption('is_first'))
        {
            $this->widgetSchema['from_name'] = new sfWidgetFormInputHidden();
            $this->widgetSchema['from_email'] = new sfWidgetFormInputHidden();
            $this->widgetSchema['message'] = new sfWidgetFormInputHidden();
        }
        else{
            $this->widgetSchema['from_name']->setLabel('Your name');
            $this->widgetSchema['from_name']->setLabel('Your email');
        }
        
        if ($cardinal = $this->getOption('cardinal'))
        {
            $this->widgetSchema['to_name']->setLabel($cardinal . ' friend name');
            $this->widgetSchema['to_email']->setLabel($cardinal . ' friend email');            
        }
    }

}
